package automaton;
import coins.Coin;
import coins.Euro2;

///////////////////////////////////////////////////////// File CoinSort2.java /////////////////////////////////////////////////
public class CoinSort2 extends Thread
{
	private CoinStore ist;
	private CoinStore ost;
	CoinSort2 (CoinStore input, CoinStore output){
	ist = input;
	ost = output;
	}

	public void run(){
		while(true)
		{
			Coin c = ist.getOut();
			if(c instanceof Euro2)
			{
				ost.throwInto(c);
			}
			else
			{
				ist.throwInto(c);
			}
		}
	}
}